package mumethod;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;

public class ValidDBConnect {
	
	public static boolean ConnectTest(String path, String table){
		Connection conn = null;
		 try {
	            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
	            conn = DriverManager.getConnection(path);
	            Statement statement = conn.createStatement();
	            ResultSet rs = statement.executeQuery("select * from " + table);
	            if (rs != null) {
	            }
	            return true;
	        } catch (Exception ex) {
	            return false;
	        }
	}
}
